sampler TextureSampler : register(s0);
sampler OverlaySampler : register(s1);


float4 PixelShader(float4 color : COLOR0, float4 texCoord : TEXCOORD0) : COLOR0
{
    
    float4 tex = tex2D(TextureSampler, texCoord);
    
    float4 overtex = tex2D(OverlaySampler, texCoord);
    //if(alpha < 0.02f)
    //{
    //   alpha = 0.0f
    //}
    
    tex.a = overtex.r;
    
    return tex;
}


technique mask
{
    pass Pass1
    {
        PixelShader = compile ps_2_0 PixelShader();
    }
}